package co.jp.roomy;

import co.jp.roomy.vo.Heya;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

/**
 * 新規部屋作成
 */
public class HeyaAddActivity extends Activity {
	
	private Heya heya;
	
	@Override
	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		setContentView(R.layout.heya_add);
		Intent intent = getIntent();
		heya = (Heya)intent.getSerializableExtra(HeyaAddActivity.this.getString(R.string.heyaKey));
	}
	/**
	 * 部屋新規作成押下時
	 * @param View view
	 */
	public void heyaAddButtonOnClick(View view) {
		String heyaNameText = ((EditText) findViewById(R.id.heyaName)).getText().toString();
		String heyaSizeText = ((EditText) findViewById(R.id.heyaSize)).getText().toString();
		Heya heya = new Heya();
		heya.setHeyaName(heyaNameText);
//		heya.setHeyaSize(heyaSizeText);
		
		Intent intent = new Intent(HeyaAddActivity.this, MadoriActivity.class);
		intent.putExtra(HeyaAddActivity.this.getString(R.string.heyaKey), heya);
		startActivity(intent);
	}
	/**
	 * カラーピッカーボタン押下時
	 * @param View view
	 */
	public void colorpalletButtonOnClick(View view) {
		Intent intent = new Intent(HeyaAddActivity.this, ColorpalletActivity.class);
		startActivity(intent);
	}
}